package cn.royan.fl.utils.builders 
{
	import cn.royan.fl.interfaces.IBuilder;
	import cn.royan.fl.values.ClientConfig;
	import flash.utils.Dictionary;
	
	/**
	 * ...
	 * @author RoYan
	 */
	public class ConfigBuilder implements IBuilder 
	{
		private var result:ClientConfig;
		private var value:Dictionary;
		
		public function ConfigBuilder( value:Dictionary ) 
		{
			this.value = value;
		}
		
		public function build():IBuilder
		{
			result = new ClientConfig();
			result.host 	= value["host"];
			result.port 	= value["port"];
			result.client 	= value["client"];
			return this;
		}
		
		public function getResult():*
		{
			return result;
		}
	}

}